package com.chf.job.dao;

import com.chf.job.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    String selectByEmail(String email);

    User selectByEmailAndPassword(@Param("email") String email, @Param("password") String password);

    int checkPwd(String email);

    int updateByEmail(@Param("email") String email, @Param("newPwd") String newPwd);

    int finPwd(@Param("email") String email, @Param("oldPwd") String oldPwd);

    User getUserBaseInfo(String email);

    void updateUserName(@Param("email") String email, @Param("userName") String userName);

}